The folder "LP Sanctions Iran Codes" includes the codes to replicate the results presented in the paper by 

Laudati, Dario and M. Hashem Pesaran (2021). Identifying the Effects of Sanctions on the Iranian Economy Using Newspaper Coverage. CESifo Working Paper No. 9217. 

This folder contains the following information:

	- Two main R files "master_code_quarterly.R" and "master_code_yearly.R".  Each of these files calls a number of subroutines in order to maximize the clarity of the codes. 
		- The subroutines that relate to the creation of quarterly results begin with "Q_", the ones that are called by the yearly code begin with "Y_". Run the main files "master_code_quarterly.R" and "master_code_yearly.R" to produce the results; by being subroutines, the documents beginning with "Q_" and "Y_" cannot be thought of as stand-alone codes.
		- The code using quarterly data ("master_code_quarterly.R") generates: Descriptive statistics for the sanctions intensity indicator; AR(1) and AR(2) estimates for the sanctions intensity variable and global output growth; SVAR estimates under multiple orderings; and the reduced form results for the effect of sanctions on Iran's output growth. The file is provided with comments that help navigate through the document.
		- The codes using yearly data ("master_code_yearly.R") generate the results for labor and education outcomes.
		- The R codes allow to obtain the results directly in TeX format, which can then be retrieved in the folder "LP Sanctions Iran Results".

	- The MATLAB code "Table_descriptives.m", which allows to reproduce the main descriptive statistics on: official and free market foreign exchange returns, inflation, output growth, and sanctions intensity variable.

	- The MATLAB codes "irfs.m" and "fevds.m", which produce the results for the impulse response analyses and forecast error variance decompositions.

	- The code "graphs_irfs.m", which allows to obtain the same IRFs graphs of the paper. It uses the output created by the "irfs.m" file previously described, therefore it is necessary to run "irfs.m" before one can obtain the related graphs.

	- The code "var_value_added.m" which allows to compute the results for the VARX models on sectoral value added growth and sectoral shares value added growth.

For replication of the results the R codes should be run using R version 4.0.2, and the MATLAB should be run  using version R2021a.

Please acknowledge the use of data, codes or the paper by citing the WP version given above.

Please e-mail Dario Laudati (laudati@usc.edu) for any doubts or inquiries.